hex-buffer-serde 0.1.1

Helper for serializing byte buffers as hex strings in `serde`
Documentation

Hex encoding helper for serde

Travis Build Status License: Apache-2.0 rust 1.30.0+ required

Documentation: Docs.rs crate docs (master)

hex-buffer-serde is a helper crate allowing to serialize types, which logically correspond to a byte buffer, in hex encoding within serde.

Usage

See crate docs for the examples of usage.

Alternatives

hex-serde provides similar functionality and is a viable alternative if you have the control over the type that needs hex-encoding. This crate differs from hex-serde in the following ways:

  • You don't need control over the (de)serialized type; it does not need to implement any specific "useful" traits (such as AsRef<[u8]>).
  • Hex encoding is used only with human-readable (de)serializers (e.g., JSON or TOML). If the (de)serializer is not human-readable (e.g., bincode), the type is serialized as a byte array.

License

hex-buffer-serde is licensed under the Apache License (Version 2.0). See LICENSE for details.